package treqs.model;

// Generated 2009-jul-12 14:12:54 by Hibernate Tools 3.2.4.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Tasks generated by hbm2java
 */
@Entity
@Table(name = "tasks", catalog = "treqs")
public class Tasks implements java.io.Serializable {

	private Integer id;
	private Taskstatuses taskstatuses;
	private Taskpriorities taskpriorities;
	private Taskeffortunits taskeffortunits;
	private String name;
	private String description;
	private int estimatedEffort;
	private Date creationTimestamp;
	private Date deletionTimestamp;
	private Date editTimestamp;
	private byte[] editLog;
	private Set<Taskstorequirements> taskstorequirementses = new HashSet<Taskstorequirements>(
			0);

	public Tasks() {
	}

	public Tasks(Taskstatuses taskstatuses, Taskpriorities taskpriorities,
			Taskeffortunits taskeffortunits, String name, int estimatedEffort,
			Date creationTimestamp, Date deletionTimestamp, Date editTimestamp) {
		this.taskstatuses = taskstatuses;
		this.taskpriorities = taskpriorities;
		this.taskeffortunits = taskeffortunits;
		this.name = name;
		this.estimatedEffort = estimatedEffort;
		this.creationTimestamp = creationTimestamp;
		this.deletionTimestamp = deletionTimestamp;
		this.editTimestamp = editTimestamp;
	}

	public Tasks(Taskstatuses taskstatuses, Taskpriorities taskpriorities,
			Taskeffortunits taskeffortunits, String name, String description,
			int estimatedEffort, Date creationTimestamp,
			Date deletionTimestamp, Date editTimestamp, byte[] editLog,
			Set<Taskstorequirements> taskstorequirementses) {
		this.taskstatuses = taskstatuses;
		this.taskpriorities = taskpriorities;
		this.taskeffortunits = taskeffortunits;
		this.name = name;
		this.description = description;
		this.estimatedEffort = estimatedEffort;
		this.creationTimestamp = creationTimestamp;
		this.deletionTimestamp = deletionTimestamp;
		this.editTimestamp = editTimestamp;
		this.editLog = editLog;
		this.taskstorequirementses = taskstorequirementses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "status", nullable = false)
	public Taskstatuses getTaskstatuses() {
		return this.taskstatuses;
	}

	public void setTaskstatuses(Taskstatuses taskstatuses) {
		this.taskstatuses = taskstatuses;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "priority", nullable = false)
	public Taskpriorities getTaskpriorities() {
		return this.taskpriorities;
	}

	public void setTaskpriorities(Taskpriorities taskpriorities) {
		this.taskpriorities = taskpriorities;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "effortUnit", nullable = false)
	public Taskeffortunits getTaskeffortunits() {
		return this.taskeffortunits;
	}

	public void setTaskeffortunits(Taskeffortunits taskeffortunits) {
		this.taskeffortunits = taskeffortunits;
	}

	@Column(name = "name", nullable = false, length = 65535)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description", length = 65535)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "estimatedEffort", nullable = false)
	public int getEstimatedEffort() {
		return this.estimatedEffort;
	}

	public void setEstimatedEffort(int estimatedEffort) {
		this.estimatedEffort = estimatedEffort;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "creationTimestamp", nullable = false, length = 19)
	public Date getCreationTimestamp() {
		return this.creationTimestamp;
	}

	public void setCreationTimestamp(Date creationTimestamp) {
		this.creationTimestamp = creationTimestamp;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "deletionTimestamp", nullable = false, length = 19)
	public Date getDeletionTimestamp() {
		return this.deletionTimestamp;
	}

	public void setDeletionTimestamp(Date deletionTimestamp) {
		this.deletionTimestamp = deletionTimestamp;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "editTimestamp", nullable = false, length = 19)
	public Date getEditTimestamp() {
		return this.editTimestamp;
	}

	public void setEditTimestamp(Date editTimestamp) {
		this.editTimestamp = editTimestamp;
	}

	@Column(name = "editLog")
	public byte[] getEditLog() {
		return this.editLog;
	}

	public void setEditLog(byte[] editLog) {
		this.editLog = editLog;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "tasks")
	public Set<Taskstorequirements> getTaskstorequirementses() {
		return this.taskstorequirementses;
	}

	public void setTaskstorequirementses(
			Set<Taskstorequirements> taskstorequirementses) {
		this.taskstorequirementses = taskstorequirementses;
	}

}
